﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ISFProject.Models.Competition;
using System.ComponentModel.DataAnnotations;

namespace ISFProject.Models
{
    public class Meeting
    {
        [Key]
        public int MeetingId { get; set; }
        [Required(ErrorMessage = "Meeting name is missing")]
        [StringLength(45, MinimumLength = 3, ErrorMessage = "Invalid fieldlength")]
        public string Name { get; set; }
        [Required(ErrorMessage = "Please select a typeOfadvert")]
        public SportCategory TypeOfMeeting { get; set; }
        [Required(ErrorMessage = "Please select a Date")]
        [Range(typeof(DateTime), "1/2/2013", "3/4/2020",
        ErrorMessage = "Value for {0} must be between {1} and {2}")]
        public DateTime Date { get; set; }

        [Required(ErrorMessage = "Location is missing")]
        [StringLength(120, MinimumLength = 3, ErrorMessage = "Invalid fieldlength")]
        public string Location { get; set; }
        [Required(ErrorMessage = "is this meeting for school cup ? ")]
        public bool IsSchoolCup { get; set; }
        
        
        public virtual List<Team> Teams { get; set; }

      
        public virtual List<EventMeeting> EventMeetings { get; set; }
        

        
    }
}